Skip to content

Commit

Permalink
schedule progress
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Oct 25, 2024
1 parent ec3309c commit f55cc4b
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 126 deletions.
390 changes: 284 additions & 106 deletions devcon-app/src/components/domain/app/dc7/sessions/index.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,24 @@
.sticky-glass {
backdrop-filter: blur(10px);
}

.session-gradient-2 {
// mask-image: linear-gradient(to top, rgb(0, 0, 0) 0%, transparent 80%);
// background: #5533dd;

// position: absolute;
// height: 50px;
overflow: hidden;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
&:before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to top, #765ae4 0%, transparent 100%); // #765ae42d 100%);
// backdrop-filter: blur(3px);
}
}
6 changes: 4 additions & 2 deletions devcon-app/src/components/domain/app/dc7/speakers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export const SpeakerCard = ({ speaker }: { speaker: SpeakerType }) => {
/>
<div className="flex flex-col">
<div className="text-sm font-medium">{speaker.name}</div>
<div className="text-xs text-[#717784]">{speaker.sessions?.length} sessions</div>
{speaker.sessions && speaker.sessions?.length > 0 && (
<div className="text-xs text-[#717784]">{speaker.sessions?.length} sessions</div>
)}
{speaker?.twitter && (
<Link className="flex items-center gap-2 self-start text-xs" to={`https://twitter.com/${speaker.twitter}`}>
<div>@{speaker.twitter}</div>
Expand Down Expand Up @@ -467,7 +469,7 @@ export const SpeakerView = ({ speaker }: { speaker: SpeakerType | null }) => {

<div className="flex flex-col gap-3">
{speaker?.sessions?.map(session => (
<SessionCard key={session.id} {...session} />
<SessionCard key={session.id} session={session} />
))}
</div>
</div>
Expand Down
13 changes: 9 additions & 4 deletions devcon-app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ export const sessionIdAtom = atom<string | null>({
default: null,
})

export const sessionsAtom = atom<SessionType[]>({
export const speakersAtom = atom<SpeakerType[] | null>({
key: 'speakers',
default: null,
})

export const sessionsAtom = atom<SessionType[] | null>({
key: 'sessions',
default: [],
default: null,
})

export const notificationsAtom = atom<any[]>({
Expand Down Expand Up @@ -214,15 +219,15 @@ function App({ Component, pageProps }: AppProps) {
<AppContext>
<Web3Provider>
<ZupassProvider>
{!sessions && (
{/* {!sessions && (
<div
data-type="loader"
className="h-screen w-screen flex items-center justify-center flex-col fixed top-0 left-0 gap-2"
>
<FancyLoader loading={!sessions} />
<p className="text-sm text-gray-500">Please wait while we prepare your Devcon Passport...</p>
</div>
)}
)} */}

<Component {...pageProps} />

Expand Down
17 changes: 13 additions & 4 deletions devcon-app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,24 @@ import Head from 'next/head'

const Index = (props: any) => {
const sessions = useRecoilValue(sessionsAtom)
// const accountContext = useAccountContext()
// const router = useRouter()
const accountContext = useAccountContext()
const router = useRouter()
// const [skipLogin, setSkipLogin] = useState(false)

useEffect(() => {
// Read skipLogin from localStorage on mount
const storedSkipLogin = localStorage.getItem('skipLogin')

if (storedSkipLogin !== 'true' && !accountContext.account) {
router.replace('/login')
}
}, [])

return (
<AppLayout pageTitle="Dashboard" breadcrumbs={[{ label: 'Dashboard' }]}>
<AppLayout pageTitle="Dashboard" breadcrumbs={[{ label: 'icon', icon: AppIcon }, { label: 'Dashboard' }]}>
<SEO title="Dashboard" />

{sessions ? <Dashboard {...props} sessions={sessions} /> : <></>}
<Dashboard {...props} sessions={sessions} />

<div className="fixed top-0 h-full w-full flex justify-center items-center opacity-100 z-5 pointer-events-none">
<FancyLoader loading={!sessions} />
Expand Down
19 changes: 13 additions & 6 deletions devcon-app/src/pages/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { WalletLoginButton } from 'components/domain/app/account/wallet'
import { useAccountContext } from 'context/account-context'
import { useRouter } from 'next/router'
import { isEmail } from 'utils/validators'
import { Link } from 'components/common/link'

const MobileLogin = (props: any) => {
const accountContext = useAccountContext()
Expand Down Expand Up @@ -265,14 +266,14 @@ const TrustModels = (props: any) => {
<div>
<p className="font-semibold">Wallet — For Web 3 Experiences</p>
<p className="text-sm text-[#939393] mt-2">
<Popover>
{/* <Popover>
<PopoverTrigger className="plain">
<InfoIcon2 className="translate-y-[2px] text-[#8C72AE]" style={{ '--color-icon': '#8C72AE' }} />
</PopoverTrigger>
<PopoverContent>
<div className="text-sm">Based and Ethereum-pilled</div>
<div className="text-sm"></div>
</PopoverContent>
</Popover>{' '}
</Popover>{' '} */}
To get the full utility out of the Devcon Passport it is recommended to connect your wallet.
</p>
<WalletLoginButton />
Expand Down Expand Up @@ -328,9 +329,15 @@ const TrustModels = (props: any) => {
</p>

<div className="flex flex-row gap-4 mt-2 text-xs text-[#7D52F4]">
<p className="underline">Privacy Policy</p>
<p className="underline">Terms of Use</p>
<p className="underline">Cookie Policy</p>
<Link to="https://ethereum.org/en/privacy-policy">
<p className="underline">Privacy Policy</p>
</Link>
<Link to="https://ethereum.org/en/terms-of-use/">
<p className="underline">Terms of Use</p>
</Link>
<Link to="https://ethereum.org/en/cookie-policy/">
<p className="underline">Cookie Policy</p>
</Link>
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion devcon-app/src/pages/schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ export default pageHOC((props: any) => {
// }

console.log(sessions, 'sessions?')
console.log(props.event, 'event?')

return (
<AppLayout pageTitle="Schedule" breadcrumbs={[{ label: 'Schedule' }]}>
<SEO title="Schedule" />

<SessionLayout sessions={sessions} />
<SessionLayout sessions={sessions} event={props.event} />

{/* {sessions ? (
(() => {
Expand Down
6 changes: 3 additions & 3 deletions devcon-app/src/services/event-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { Room } from 'types/Room'
import { defaultSlugify } from 'utils/formatting'
import Fuse from 'fuse.js'
import { APP_CONFIG } from 'utils/config'
import { useRecoilState, RecoilState } from 'recoil'
import { sessionsAtom } from 'pages/_app'
import { useRecoilState } from 'recoil'
import { sessionsAtom, eventAtom, speakersAtom } from 'pages/_app'

const cache = new Map()
const baseUrl = APP_CONFIG.API_BASE_URL
Expand Down Expand Up @@ -54,7 +54,7 @@ export const useSessionData = (): SessionType[] | null => {
}

export const useSpeakerData = (): Speaker[] | null => {
const [speakers, setSpeakers] = useState<Speaker[] | null>(null)
const [speakers, setSpeakers] = useRecoilState(speakersAtom)
const version = useEventVersion()

useEffect(() => {
Expand Down

0 comments on commit f55cc4b

Please sign in to comment.