Skip to content

Commit

Permalink
Update Aoc1502.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoxoxo authored Sep 20, 2023
1 parent 208ec4d commit 0356990
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/includes/Aoc1502.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { FetchData, LenNStrsFromLine } from "../helpers/Helpers"
const URL:string = "https://raw.githubusercontent.com/nuoxoxo/in/main/aoc/1502.in"

var Aoc1501 = () => {

const [lines, setLines] = useState<string[]>( [] )
const [p1, setP1] = useState<number>( 0 )
const [p2, setP2] = useState<number>( 0 )

const handleData = async () => {

try {
const raws = await FetchData(URL)
setLines(raws)
Expand All @@ -18,6 +20,7 @@ var Aoc1501 = () => {
}

const Solver = () => {

if (lines === undefined || lines[0] === undefined)
return
let res1: number = 0
Expand Down

0 comments on commit 0356990

Please sign in to comment.