-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from dskunkler/77-let-events-become-trackable
77: let events become trackable
- Loading branch information
Showing
5 changed files
with
473 additions
and
133 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
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,36 @@ | ||
import React from "react"; | ||
import { api } from "~/utils/api"; | ||
import { CalendarWizard } from "../components/calendar-wizard"; | ||
import { useEffect, useState } from "react"; | ||
import MacroCycleComponent from "../components/macro-cycle"; | ||
|
||
const MacroView = () => { | ||
api.posts.getAll.useQuery(); | ||
|
||
const { data: latestMacroData } = api.macroCycles.getMostRecent.useQuery(); | ||
|
||
useEffect(() => { | ||
// console.log("latest?: ", latestMacroData); | ||
}, [latestMacroData]); | ||
|
||
const [showCalendar, setShowCalendar] = useState(false); | ||
|
||
return ( | ||
<> | ||
{latestMacroData ? ( | ||
<MacroCycleComponent macroCycle={latestMacroData} /> | ||
) : showCalendar ? ( | ||
<CalendarWizard closeCal={() => setShowCalendar(false)} /> | ||
) : ( | ||
<button | ||
onClick={() => setShowCalendar(true)} | ||
className="rounded-full border border-purple-200 px-4 py-1 text-sm font-semibold text-purple-600 hover:border-transparent hover:bg-purple-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2" | ||
> | ||
Get Started | ||
</button> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default MacroView; |
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
Oops, something went wrong.
ee3e3d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
climbing-journal – ./
climbing-journal-git-main-dskunkler.vercel.app
climbing-journal-beta.vercel.app
climbing-journal-dskunkler.vercel.app