Timeline
This commit is contained in:
parent
6623f4c0a2
commit
36f666483f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
57248
public/assets/bundle.js
57248
public/assets/bundle.js
File diff suppressed because one or more lines are too long
|
@ -1,72 +0,0 @@
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-dom.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-is.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-runtime.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* scheduler.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license React
|
|
||||||
* use-sync-external-store-with-selector.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** @license React v16.13.1
|
|
||||||
* react-is.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//! moment.js
|
|
||||||
|
|
||||||
//! moment.js locale configuration
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
||||||
import { Box, Button, Card, TextField, Typography } from "@mui/material";
|
import { Box, Button, Card, TextField, Typography } from "@mui/material";
|
||||||
import React, { useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import {addPost} from "./posts.store"
|
import {addPost} from "./posts.store"
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
@ -126,9 +126,30 @@ function PostTemplete({id, date, context})
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Typography fontSize="0.7em" color="#9b9b9b" title={moment(date).format("HH:mm:ss DD/MM/YYYY")}>
|
<RevokeTiming date={date} />
|
||||||
{moment(date).locale("tr").fromNow(false)} yayımladı
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Card>
|
</Card>
|
||||||
|
}
|
||||||
|
|
||||||
|
function RevokeTiming({date})
|
||||||
|
{
|
||||||
|
let [text, setText] = useState([,]);
|
||||||
|
|
||||||
|
function update()
|
||||||
|
{
|
||||||
|
setText([
|
||||||
|
moment(date).format("HH:mm:ss DD/MM/YYYY"),
|
||||||
|
moment(date).locale("tr").fromNow(false)
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
update();
|
||||||
|
let timer = setInterval( update, 30_000)
|
||||||
|
return () => clearInterval(timer)
|
||||||
|
},[]);
|
||||||
|
|
||||||
|
return <Typography fontSize="0.7em" color="#9b9b9b" title={text[0]}>
|
||||||
|
{text[1]} yayımladı
|
||||||
|
</Typography>
|
||||||
}
|
}
|
Loading…
Reference in New Issue