Skip to content

Commit

Permalink
Fix - Alter title and favicon (#75)
Browse files Browse the repository at this point in the history
* fix: alter title and favicon of the pages

* fix: alter test to use new text for agenda link
  • Loading branch information
jv-farias authored Jul 22, 2024
1 parent 8d7fe4f commit 0abb360
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/frontend-day.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<title>Vite + React + TS</title>
<title>Agenda Frontend Day</title>
</head>
<body>
<div id="root"></div>
Expand Down
6 changes: 6 additions & 0 deletions public/frontend-day.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/LinkAgenda/LinkAgenda.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ test('renders LinkAgenda', () => {
<LinkAgenda />
</Router>
);
const element = getByText(/Acontecendo agora/i);
const element = getByText(/Ver minha agenda/i);
expect(element).toBeInTheDocument();
});
11 changes: 7 additions & 4 deletions src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Palestra } from "@/api/types";
import { useState } from "react";
import { useEffect, useState } from "react";
import { ButtonGroup } from "@/components/ButtonGroup";
import { DeadComponent } from "@/components/DeadComponent";
import { Header } from "@/components/Header";
Expand All @@ -26,11 +26,14 @@ export const HomePage = () => {
.sort((a, b) => a.hour.localeCompare(b.hour));

const filteredTalks = allTalks.filter(
(talk) => !currentMode || talk.room === currentMode.toLowerCase(),
(talk) => !currentMode || talk.room === currentMode.toLowerCase()
);

const { talksBeforeMidDay, talksAfterMidDay } =
splitTalksToMidDay(filteredTalks);
const { talksBeforeMidDay, talksAfterMidDay } = splitTalksToMidDay(filteredTalks);

useEffect(() => {
document.title = "Agenda do Evento";
}, []);

return (
<section className="container my-12 flex flex-col items-center">
Expand Down
5 changes: 5 additions & 0 deletions src/pages/LivePage/LivePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Separator } from "@/components/ui/separator";
import { useAgenda } from "@/hooks/useAgenda";
import { useSavedTalks } from "@/hooks/useSavedTalks";
import { getLiveTalk, getNextTalk } from "./utils/talks";
import { useEffect } from "react";

export const LivePage = () => {
const { data } = useAgenda();
Expand All @@ -19,6 +20,10 @@ export const LivePage = () => {
const nextComunidadesTalk = getNextTalk(data?.Comunidades || [], now);
const nextConvidadosTalk = getNextTalk(data?.Convida || [], now);

useEffect(() => {
document.title = "Acontecendo agora";
}, []);

return (
<section className="container mt-12 flex flex-col items-center">
<ReturnButton/>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/MyAgenda/MyAgenda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { SpeakerCard } from "@/components/SpeakerCard";
import { useAgenda } from "@/hooks/useAgenda";
import { useSavedTalks } from "@/hooks/useSavedTalks";
import { agendaResponseToTalks, splitTalksToMidDay } from "@/lib/talks";
import { useMemo } from "react";
import { useEffect, useMemo } from "react";
import { Link } from "react-router-dom";

export const MyAgenda = () => {
Expand All @@ -29,6 +29,10 @@ export const MyAgenda = () => {

const hasSavedTalks = useMemo(() => savedTalks.length > 0, [savedTalks]);

useEffect(() => {
document.title = "Minha Agenda";
})

return (
<section className="container mt-12 flex flex-col items-center">
<ReturnButton />
Expand Down

0 comments on commit 0abb360

Please sign in to comment.