mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
feat: register pages routes guards.
feat: retrieve all organizations details to authenticated user. feat: redux organization reducers and actions.
This commit is contained in:
16
client/src/components/Dashboard/EnsureOrganizationIsReady.js
Normal file
16
client/src/components/Dashboard/EnsureOrganizationIsReady.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import { Redirect } from 'react-router-dom';
|
||||
|
||||
export default function EnsureOrganizationIsReady({
|
||||
children,
|
||||
}) {
|
||||
const isOrganizationReady = false;
|
||||
|
||||
return (isOrganizationReady) ? children : (
|
||||
<Redirect
|
||||
to={{
|
||||
pathname: '/register'
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user