Fix bug with gangs syntax error
This commit is contained in:
@@ -18,8 +18,8 @@ const GangDetails = (props) => {
|
||||
try {
|
||||
const response = await axios.get(`/api/gangs/${gang.id}/backup`);
|
||||
const timestamp = Date.now();
|
||||
const safeGangName = str.replace(/blue/g, "red");
|
||||
fileDownload(response.data, `fil.csv`, 'text/csv')
|
||||
const safeGangName = gangName.replace(/[^A-Za-z0-9]+/g, "");
|
||||
fileDownload(response.data, `${safeGangName}-${timestamp}.csv`, 'text/csv')
|
||||
} catch (e) {
|
||||
console.log("EE ", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user