-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rotorsoft/9507-get-user-feed
- Loading branch information
Showing
38 changed files
with
816 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/commonwealth/client/scripts/helpers/ContractHelpers/Abi/NamespaceFactoryAbi.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ges/commonwealth/client/scripts/state/api/trpc/subscription/useSubscriptionPreferences.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { trpc } from 'utils/trpcClient'; | ||
|
||
export function useSubscriptionPreferences() { | ||
return trpc.subscription.getSubscriptionPreferences.useQuery({}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.PageNotFound { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,44 @@ | ||
import React from 'react'; | ||
import useUserStore from 'state/ui/user'; | ||
import { useAuthModalStore } from '../../state/ui/modals'; | ||
import { CWEmptyState } from '../components/component_kit/cw_empty_state'; | ||
import { CWButton } from '../components/component_kit/new_designs/CWButton'; | ||
import { AuthModal, AuthModalType } from '../modals/AuthModal'; | ||
import './404.scss'; | ||
|
||
type PageNotFoundProps = { title?: string; message?: string }; | ||
|
||
export const PageNotFound = (props: PageNotFoundProps) => { | ||
const { message } = props; | ||
|
||
const user = useUserStore(); | ||
|
||
const { authModalType, setAuthModalType } = useAuthModalStore(); | ||
|
||
return ( | ||
<CWEmptyState | ||
iconName="cautionCircle" | ||
content={ | ||
message || | ||
` | ||
This page may not be visible to the public. | ||
If it belongs to a private thread or community, try logging in. | ||
<div className="PageNotFound"> | ||
<CWEmptyState | ||
iconName="cautionCircle" | ||
content={ | ||
message || | ||
` | ||
This page is private. | ||
Please Sign in to view or join the conversation. | ||
` | ||
} | ||
/> | ||
} | ||
/> | ||
{!user.isLoggedIn && ( | ||
<CWButton | ||
buttonType="primary" | ||
label="Sign in" | ||
onClick={() => setAuthModalType(AuthModalType.SignIn)} | ||
/> | ||
)} | ||
<AuthModal | ||
type={AuthModalType.SignIn} | ||
onClose={() => setAuthModalType(undefined)} | ||
isOpen={!!authModalType} | ||
/> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.