Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@symbolic/react-app

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbolic/react-app - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

src/apps-data.js

2

package.json
{
"name": "@symbolic/react-app",
"version": "1.0.3",
"version": "1.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -30,2 +30,4 @@ import React from 'react'; //eslint-disable-line

render() {
var {appKey} = this.props;
return (

@@ -36,3 +38,3 @@ <Provider store={this.props.store}>

<div className='sf-app-wrapper'>
<Route component={Header}/>
<Route render={(props) => <Header {...props} {...{appKey}}/>}/>
<div className='sf-content'>

@@ -39,0 +41,0 @@ {this.props.children}

import {_, React, Component, className, lib} from 'components'; //eslint-disable-line
import {connect} from 'react-redux';
import {Link} from 'react-router-dom';
import appsData from '../../apps-data';
import './header.scss';
var Header = ({appData, session, ...props}) => {
var domain = '';
class Header extends Component {
render() {
var {appKey, session, ...props} = this.props;
return (
<div className='sf-header'>
<div className='app-name'>
Accounts
</div>
<div className='menu-button'>
var {accountsDomain} = this;
var appData = appsData[appKey];
</div>
<div className='inline-links'>
return (
<div className='sf-header'>
<div className='app-name'>
<div style={{...appData.style}}>{appData.title}</div>
</div>
<div className='menu-button'>
</div>
<div className='inline-links'>
</div>
{session.isLoggedIn ? (
<>
<div className='user-info'>
{session.user.name}
</div>
<div className='session-links'>
<a {...className([props.location.pathname === '/log-out' && 'active'])} href={`${accountsDomain}/log-out`}>Log out</a>
</div>
</>
) : (
<>
<div className='session-links'>
<a {...className([props.location.pathname === '/log-out' && 'active'])} href={`${accountsDomain}/log-in`}>Log in</a>
<a {...className([props.location.pathname === '/sign-up' && 'active'])} href={`${accountsDomain}/sign-up`}>Sign up</a>
</div>
</>
)}
</div>
);
}
{session.isLoggedIn ? (
<>
<div className='user-info'>
{session.user.name}
</div>
<div className='session-links'>
<Link {...className([props.location.pathname === '/log-out' && 'active'])} to={`${domain}/log-out`}>Log out</Link>
</div>
</>
) : (
<>
<div className='session-links'>
<Link {...className([props.location.pathname === '/log-out' && 'active'])} to={`${domain}/log-in`}>Log in</Link>
<Link {...className([props.location.pathname === '/sign-up' && 'active'])} to={`${domain}/sign-up`}>Sign up</Link>
</div>
</>
)}
</div>
)
get accountsDomain() {
return process.env.NODE_ENV === 'development' ? 'http://localhost:3051' : 'https://accounts.symbolicframeworks.com';
}
}
export default connect(state => _.pick(state, ['session']))(Header);

@@ -11,15 +11,13 @@ import {_, React, Component, className, lib} from 'components'; //eslint-disable-line

return (
(!hasPermission ? (
<Redirect to={`${this.accountsDomain}/log-in`}/>
) : (
<div {...className([`page ${_.kebabCase(this.key)}-page`, this.className])}>
{content}
</div>
))
);
if (!hasPermission) window.location = `${this.accountsDomain}/log-in`;
return hasPermission ? (
<div {...className([`page ${_.kebabCase(this.key)}-page`, this.className])}>
{content}
</div>
) : null;
}
get accountsDomain() {
return '';
return process.env.NODE_ENV === 'development' ? 'http://localhost:3051' : 'https://accounts.symbolicframeworks.com';
}

@@ -26,0 +24,0 @@ }

import {connect, reducerAndActionsFor, createStore} from './redux/helpers/helpers';
import {logIn, logOut, signUp} from './redux/reducers/session/session-reducer';
import appsData from './apps-data';

@@ -12,3 +13,4 @@ import Page from './components/page/page';

connect, reducerAndActionsFor, createStore,
logIn, logOut, signUp
logIn, logOut, signUp,
appsData
};

@@ -15,0 +17,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc