Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
quick007 committed Mar 14, 2024
1 parent 7b3164e commit cda1052
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions islands/events/editing/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ export default function EventSettings(props: {
/>
</label>
<label class="flex flex-col">
<p class="label-text">Short Description</p>
<p class="label-text">Event Description</p>
<textarea
name="description"
class="h-56 md:h-48 min-h-[6rem] max-h-[130rem] md:max-h-[16rem]"
class="h-56 md:h-48 min-h-[6rem] md:max-h-[130rem] max-h-[16rem]"
value={formState.description}
onInput={(e) =>
setFormState((state) => ({
Expand Down
2 changes: 1 addition & 1 deletion routes/api/events/ticket/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export const handler: Handlers = {
"{{QR-VALUE}}",
`https://events.deno.dev/api/qr?ticket=${eventID}_${showtimeID}_${ticketID}`,
)
.replace(
.replaceAll(
"{{TICKET-LINK}}",
`${url.protocol}//${url.host}/events/${eventID}/tickets/${ticketID}?s=${showtimeID}`,
)
Expand Down
9 changes: 8 additions & 1 deletion routes/events/(pages)/organizing/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { defineLayout, RouteContext } from "$fresh/server.ts";
import { getUser, Plan } from "@/utils/db/kv.ts";
import { badEventRequest } from "@/routes/events/[id]/_layout.tsx";

export default defineLayout((req: Request, ctx) => {
export default defineLayout(async (req: Request, ctx) => {
const organizingTabs = ["events", "accounting", "collections", "discounts"];
const url = new URL(req.url);
const tabName = url.pathname.split("/")[3] ?? "events";
const user = await getUser(req);

if (!user || user.plan !== Plan.ENTERPRISE) {
return badEventRequest
}

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default defineRoute(async (req, ctx) => {
</div>
<div className="my-auto flex flex-col pb-12">
<div className="rounded-md bg-theme-normal/10 border border-theme-normal/50 w-max px-2 mx-auto mb-3 font-medium text-sm text-theme-normal">
Coming Soon
Closed Alpha
</div>
<a href={loggedIn ? "/events/organizing" : "/login"}>
<CTA btnType="cta">I'm organizing</CTA>
Expand Down

0 comments on commit cda1052

Please sign in to comment.