Skip to content

Commit

Permalink
hilangkan sementara titik station, tambahkan wilayah timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusindrayana committed Apr 10, 2024
1 parent 7f28a62 commit 3eeacee
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 75 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

## Resources
- GeoJson Kota Indonesia : https://github.com/eppofahmi/geojson-indonesia
- Timezone Geojson : https://github.com/treyerl/timezones
- Inatews : https://inatews.bmkg.go.id/wrs/index.html
- Radius Lingkarang : https://stackoverflow.com/questions/37599561/drawing-a-circle-with-the-radius-in-miles-meters-with-mapbox-gl-js
- UI Art : https://codepen.io/hlfcoding/pen/oXpWOV
35 changes: 35 additions & 0 deletions app/components/Jam.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { useEffect, useState } from "react";
const { DateTime } = require("luxon");

export default function Jam({timeZone}: {timeZone?: string}) {


const calculateClock = () => {
let dt = DateTime.now();
if(dt){
dt = dt.setZone(timeZone);
}
return dt.toFormat('HH:mm:ss');
}

const [readableTime, setReadableTime] = useState(calculateClock());


useEffect(() => {



const interval = setInterval(() => {
setReadableTime(calculateClock());

}, 1000);

return () => clearInterval(interval);
});
return (
<>
{readableTime}
</>

)
}
2 changes: 1 addition & 1 deletion app/components/mapbox_marker/titik_gempa.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default class TitikGempa {
</tbody>
</table>
</div>}
<p className="my-2">
<p className="mt-1">
{this.setting?.description}
</p>
</Card>)
Expand Down
Loading

0 comments on commit 3eeacee

Please sign in to comment.